package utils

import (
	"math/rand"
	"strconv"
	"strings"
	"time"
)

var nums = [10]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

func GenerateVcodeOf(oflen int) string {
	sb := strings.Builder{}
	rand.Seed(time.Now().UnixNano())

	for i := 0; i < oflen; i++ {
		sb.WriteString(strconv.Itoa(nums[rand.Intn(len(nums))]))
	}
	return sb.String()
}
